package com.lk.web.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @description: MybatisPlus配置类
 * @author: Aspirin
 * @create: 2020-06-21 09:37
 * @remarks EnableTransactionManagement开启事务管理，MapperScan扫描mapper接口
 */
@EnableTransactionManagement
@MapperScan("com.lk.web.mapper")
@Configuration
public class MybatisPlusConfig {
  /** 分页插件 */
  @Bean
  public PaginationInterceptor paginationInterceptor() {
    return new PaginationInterceptor();
  }
}
